Installation

cpprb requires following softwares before installation.

  • C++17 compiler (for installation from source)
  • Python 3
  • pip

Cuurently, clang, which is a default Xcode C/C++ compiler at Apple macOS, cannot compile cpprb.

If you are macOS user, you need to install GCC and set environment values of CC and CXX to g++, or just use virtual environment (e.g. Docker).

Step by step installation is described here.

Additionally, here are user’s good feedbacks for installation at macOS and Ubuntu. (Thanks!)

The following command installs cpprb together with other dependancies.

pip install cpprb

Depending on your environment, you might need sudo or --user flag for installation.

On supported platflorms (Linux x86-64 and Windows amd64), binary packages are hosted on PyPI can be used, so that you don’t need C++ compiler.

If you have trouble to install from binary, you can fall back to source installation to passk --no-binary option to the above pip command.

Currently, no other platforms, such as macOS, and 32bit or arm-architectured Linux and Windows, cannot install from binary, and need to compile by yourself. Please be patient, we will plan to support wider platforms in future.

2 Install from source code

First, download source code manually or clone the repository;

git clone https://gitlab.com/ymd_h/cpprb.git

Then you can install same way;

cd cpprb
pip install .

For this installation, you need to convert extended Python (.pyx) to C++ (.cpp) during installation, it takes longer time than installation from PyPI.